

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>


<html lang="en">
<head>


	<title>Survey Form</title>
   
    <script type="text/javascript">
   
 
    var hasVerticals = "<%=session.getAttribute("SESSION_LRESULTS")%>";
  if(hasVerticals == null)
 	     window.location.href="closing.jsp";
 	 
 	 
</script>

  	<link rel="stylesheet" href="/surveyApp/css/styles.css">
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>

	<script src="js/slides.min.jquery.js"></script>
	<script>
		$(function(){
			$('#slides').slides({
				preload: true,
				preloadImage: 'img/loading.gif',
				play: 5000,
				pause: 2500,
				hoverPause: true
			});
		});
	</script>
	
	<script>
	jQuery(document).ready(function($) {
 
	$(".upclicks, .downclicks, .scroll").click(function(event){		
		event.preventDefault();
		$('html,body').animate({scrollTop:$(this.hash).offset().top}, 1000);
	});
});
</script>
<script src="js/jquery.quicksand.js"></script>
<script src="js/script.js"></script>
 
</head>

<s:set var="result_type_left" value="result_type_left" />
<s:set var="result_type_right" value="result_type_right" />

<body >


<div id="home"></div>
<header>
	<div class="container">
		<h1 class="headercontact">Send us a <a href="mailto:duartes@cs.utwente.nl">message</a></h1>
        <br>
        <br>
   </div>
  </header>
<div align="center"> 

    
   <table width="80%"  style="max-width: 1200px;">
   <tr>
   <td>
   	<div class="instructions2">
   		Please select the best results for the query <span> <s:property value="q.query"/> </span>
   	</div>
   	<br>
   <td>
   
   </tr>  
   </table> 
   <div align="center"> 
  <s:form action="register_test" method="post" >
  <table align="center"  width="50%" border="2" cellspacing="2" cellpadding="2">
 
 <tr>
 <td>
 <%
  if(((String)session.getAttribute("missing_value"))=="true"){
	   
	   %>
	   
	   <h1 class="error_message"> Please fill the form</h1><br>
   <% }%>
 
 </td>
 </tr>
  <tr>
    <td  width="33%" class="verticalDescription">
    
       <input type="radio" name="assesment.score" value="1"> 

    <!--  <s:property value="left_vertical.name"/>  --> Left column results

   
  </td>
    
   <td  width="33%" class="verticalDescription">
   
     <input type="radio" name="assesment.score" value="0"> 
   I don't know</td>
      
    <td  width="33%" class="verticalDescription">
      <input type="radio" name="assesment.score" value="2"> 
    
     <!-- <s:property value="left_vertical.name"/>  --> Right column results</td>
    
  </td>
   
   <!-- <tr><td>
  
 
  
  
   <s:radio theme="css_xhtml" name="assesment.score" list="#{'1':'Left column results','0':'		I do not know', '2':'		Right column results'}"  />
  </td></tr> -->
  
 </table>
 </div> 
 <div align="center">
  <table align="center"  width="20%" border="0" >
  <tr align="center" >
    <td   align="center"  valign="middle">     
    <s:submit key="Submit"   align="center" class="button14 buttons" value="Submit"  />
   </td>
  </tr>
  </table>
   </div>
</s:form>
    
    <br>
    <br>
 <table width="85%" class="table_spacing">


<!--  <tr>
 	
    <td  width="45%" class="verticalDescription">
    
    <a class="vertical_title" href="<s:property value="left_vertical.url"/>" class="vertical_title"><s:property value="left_vertical.name"/></a>	
    	<div class="vertical_description">  <s:property value="left_vertical.description"/>  </div> <br> <br> <br> </td>
   <td width="20%" class="verticalDescription"></td>
    <td  width="40%" class="verticalDescription">
      <a class="vertical_title" href="<s:property value="right_vertical.url"/>" class="vertical_title"><s:property value="right_vertical.name"/></a>	
    	<div class="vertical_description">  <s:property value="right_vertical.description"/>  </div> <br> <br> <br> </td>
 	
 </tr> -->

<s:set var="thumbnail" value="thumbnail" />

<TR >
<TD width="40%" class="vertaligntop">

<table id="web_results" class="sample">
 <col style="padding-right:20px;" />
    <col style="padding-right:20px;" />

<s:iterator value="left_results" var="verticalResult">

	<tr>
	<s:if test="%{#verticalResult.thumbnail!=''}"> 
  		
  		<td align="center" class="vertalignmiddle">
  			 <img  id="scale-down" style="height: 80px" src="<s:property value="thumbnail"/>" alt="Thumbnail" onerror="this.src='/surveyApp/images/filling_small.png';"/>
	  		<br> <br>
		</td>
		<td width="2%" align="center" valign="middle">
	</s:if>
	
	<s:else>
	
	</s:else>

	<td>
		<table class="table_spacing2" > 
         	<s:if test="%{#result_type_left!=null  && #result_type_left=='IMAGE_VERTICAL'}"> 
  				<tr> 
  				<td>
  					<div id="scale-down" style="height: 160px">
  						<a href="<s:property value="url"/>"><img src="<s:property value="url"/>" alt="<s:property value="title"/>"></a> 
					</div>
  					<br><br>
				</td>
				</tr>
			</s:if>
	
			<s:else>
				<tr>
				  <td>
				 
        			<a class="result_title" href="<s:property value="url"/>" class="result_title"><s:property value="title"/></a>
       				</td> 
          		</tr>
        		<tr> 
                  <td> <div class="result_url"><s:property value="url"/> </div>		  </td> 
           		 </tr>
		   		<tr> 
              		 <td> <div class="result_snippet"><s:property value="snippet"/></div> <br>
               		</td> 
				</tr>
				
				</s:else>
         	
	    </table>
	</td>
	</tr>	
</s:iterator>

</table>
	</td>
<td width="10%" class="vertaligntop"></td>
<TD width="45%" class="vertaligntop">

<table id="right_results" class="sample"  border="1">
 <col style="padding-right:20px;" />
    <col style="padding-right:20px;" />

<s:iterator value="right_results" var="verticalResult">

	<tr>
	<s:if test="%{#verticalResult.thumbnail!=''}"> 
  		
  		<td align="center" class="vertalignmiddle">
  			 <img  id="scale-down" style="height: 80px" src="<s:property value="thumbnail"/>" alt="Thumbnail" onerror="this.src='/surveyApp/images/filling_small.png';"/>
	  		<br> <br>
		</td>
		<td width="2%" align="center" valign="middle">
	</s:if>
	
	<s:else>
		
	
	</s:else>

	<td>
		<table class="table_spacing2" > 
         	
         	<s:if test="%{#result_type_right!=null  && #result_type_right=='IMAGE_VERTICAL'}"> 
  				<tr> 
  				<td>
  		
  					<div id="scale-down" style="height: 160px">
  					<a href="<s:property value="url"/>"><img src="<s:property value="url"/>" alt="<s:property value="title"/>"></a> 
  					  
					</div>
  				
  					<br><br>
				</td>
				</tr>
			</s:if>
	
			<s:else>
				<tr>
				  <td>
				 
        			<a class="result_title" href="<s:property value="url"/>" class="result_title"><s:property value="title"/></a>
       				</td> 
          		</tr>
        		<tr> 
                  <td> <div class="result_url"><s:property value="url"/> </div>		  </td> 
           		 </tr>
		   		<tr> 
              		 <td> <div class="result_snippet"><s:property value="snippet"/></div> <br>
               		</td> 
				</tr>
				
				</s:else>
         	
	    </table>
	</td>
	</tr>	
</s:iterator>

</table>

</TD>

</TR>
</table>

 </div>
  
   <br>


<footer>
 	<div id="footerbg">
 		<div class="container">
 			<h4 class="copyright" align="right"><a href="www.utwente.nl/">University of Twente.</a></h4>
 			
 		</div>
 	</div>
</footer>



</body>
</html>	